package com.kgc.scd.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * Created On : 2022/11/14.
 * <p>
 * Author : 刘慧枫
 * <p>
 * Description: 用户类
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
//@TableName("shop_user")//指定表名，不写默认用实体名
public class ShopUser {

    //用户编号
//    @TableId(type = IdType.AUTO)
    private String id;

    //用户名
    @TableField(value = "username")
    private String userName;

    //用户密码
    private String password;

    //性别
//    @TableField(value = "gender")
    private Integer gender;

    //生日
//    @TableField(value = "birthday")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    //注册时间
//    @TableField(value = "register_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date registerTime;

    //最后登录时间
//    @TableField(value = "last_login_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date lastLoginTime;

    //最后登录ip
//    @TableField(value = "last_login_ip")
    private String lastLoginIp;

    //用户等级id
//    @TableField(value = "user_level_id")
    private Integer userLevelId;

    //绰号
//    @TableField(value = "nickname")
    private String nickname;

    //手机号
//    @TableField(value = "mobile")
    private String mobile;

    //注册ip
//    @TableField(value = "register_ip")
    private String registerIp;

    //微信授权id
//    @TableField(value = "weixin_openid")
    private String weixinOpenid;

    //头像
//    @TableField(value = "head_img")
    private String headImg;

    //积分
    private Integer integration;

}
